#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int n = 0;
    int a = 2;
    int b = 3;
    int sum = 2;
    scanf("%d", &n);
    for (int i = 1; i < n; i++)
    {

        a = a + b;
        sum = sum + a;
    }
    if (1 == n)
    {
        printf("2");
    }
    printf("%d", sum);


    return 0;
}